<script setup lang="ts">
// 引入vue
import { ref, defineProps } from "vue"

// 获取参数
const { title } = defineProps(['title', 'show'])
</script>

<template>
    <!--  公共组件 标题 -->
    <div class="title" v-if="show">
        {{ title }}
    </div>
    <div class="right-title" v-else>
        {{ title }}
    </div>
</template>


<style scoped lang="scss">
.title {
    width: 100%;
    height: 30px;
    margin-bottom: 10px;
    line-height: 30px;
    padding-left: 10px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: bold;
    color: #9fb3fc;
    background: url(../assets/左.png) no-repeat 0 0 / 100% 100%;
}

.right-title {
    height: 30px;
    margin-bottom: 10px;
    line-height: 30px;
    padding-left: 20px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: bold;
    color: #9fb3fc;
    background: url(../assets/右.png) no-repeat 0 0 / 100% 100%;
}
</style>